{% extends "bootstrap/base.html" %}

{% block title %}{% block page_title %}{% endblock %} - 保定华仿热控技术交流网站{% endblock%}

        {% block head %}
        {{ super() }}
        <link rel="shortcut icon" href="{{ url_for('static', filename='control.jpg') }}" type="image/x-icon">
        <link rel="icon" href="{{ url_for('static', filename='control.jpg') }}" type="image/x-icon">
        <link href="{{ url_for('static', filename='styles69.css') }}" rel="stylesheet" type="text/css">
        {% endblock %}

        {% block navbar %}
        <nav class="navbar navbar-inverse navbar-fixed-top">
            <div class="container">
                <div class="navbar-header">
                    <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                        <span class="sr-only">Toggle navigation</span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                    </button>
                    <a class="navbar-brand" href="{{ url_for('main.index') }}">技术交流</a>
                </div>
                <div id="navbar" class="collapse navbar-collapse">
                    <ul class="nav navbar-nav">
                        <li class={% block index %}"#active"{% endblock %}><a href="{{ url_for('main.index') }}">主页</a></li>
                        <li><a href="{{ url_for('rk_manage.manage') }}">热控管理</a></li>
                        <li><a href="{{ url_for('main.blog', id=999) }}">网站使用说明</a></li>
                        <li class={% block about %}"#active"{% endblock %}><a href="{{ url_for('main.blog', id=998) }}">关于本站</a></li>
                        <li class=""><a href="#"></a></li>
                    </ul>
                    <ul class="nav navbar-nav navbar-right">
                        {% if current_user.is_authenticated %}
                        <li class="dropdown">
                            <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
                                <img src="{{ current_user.gravatar(size=18) }}">
                                {{current_user.username}}<span class="caret"></span>
                            </a>
                            <ul class="dropdown-menu">
                                {% if current_user.is_rkuser() %}
                                <li><a href="{{ url_for('manage.create_blog') }}">创建日志</a></li>
                                <li><a href="{{ url_for('manage.create_subject') }}">创建专题</a></li>
                                <li><a href="{{ url_for('manage.manage_blogs') }}">博客管理</a></li>
                                <li><a href="{{ url_for('rk_manage.manage') }}">热控管理</a></li>
                                {% endif %}
                                <li><a href="{{ url_for('manage.manage_collections') }}">我的收藏</a></li>
                                <li><a href="{{ url_for('manage.change_password') }}">修改密码</a></li>
                                <li role="separator" class="divider"></li>                                              
                                <li><a href="{{ url_for('auth.logout') }}">注销用户</a></li>
                            </ul>
                        </li>
                        {% else %}
                        <li><a href="{{ url_for('auth.login') }}">登录 | 注册</a></li>
                        {% endif %}
                    </ul>
                </div><!--/.nav-collapse -->
            </div>
        </nav>
        {% endblock %}

        {% block content %}
        <div class="container">
            {% for message in get_flashed_messages() %}
            <div class="alert alert-warning">
                <button type="button" class="close" data-dismiss="alert">&times;</button>
                {{ message }}
            </div>
            {% endfor %}
            {% block page_content %}{% endblock %}
        </div>
        <div class="col-md-12 blog-footer">
            <footer class="footer">
                <p>Powered by <a href="#">SinoSimu</a>. Copyright © 2018.</p>
                <p>All rights reserved.</p>
                <p>
                    <a href="#">回到顶部</a>
                </p>
            </footer>
        </div class="blog-footer">
        {% endblock %}


        {% block scripts %}
        {{ super() }}
        {{ moment.include_moment() }}
        {{ moment.lang("zh-CN") }} 
        <script type="text/javascript">
        $(function (){
            $("[data-toggle='popover']").popover();
        });        
        </script>
        {% endblock %}